Observable Sharing for Functional

نویسنده

  • Koen Claessen
چکیده

Pure functional programming languages have been proposed as a vehicle to describe, simulate and manipulate circuit speciications. We propose an extension to Haskell to solve a standard problem when manipulating data types representing circuits in a lazy functional language. The problem is that circuits are nite graphs { but viewing them as an algebraic (lazy) datatype makes them indistinguishable from potentially innnite regular trees. However, implementations of Haskell do indeed represent cyclic structures by graphs. The problem is that the sharing of nodes that creates such cycles is not observable by any function which traverses such a structure. In this paper we propose an extension to call-by-need languages which makes graph sharing observable. The extension is based on non updatable reference cells and an equality test (sharing detection) on this type. We show that this simple and practical extension has well-behaved semantic properties, which means that many typical source-to-source program transformations, such as might be performed by a compiler, are still valid in the presence of this extension.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Observable Sharing for Functional Circuit Description

y Abstract Pure functional programming languages have been proposed as a vehicle to describe, simulate and manipulate circuit speciications. We propose an extension to Haskell to solve a standard problem when manipulating data types representing circuits in a lazy functional language. The problem is that circuits are nite graphs { but viewing them as an algebraic (lazy) datatype makes them indi...

متن کامل

Analyzing the Aspects of Cross Sharing Ownership

With the growth of capital market, the shareholding structure of companies has become more complex. Direct ownership is easily recognizable through companies’ shareholders information, however with the formation of cross shareholding among companies, a kind of indirect and complex shareholding has emerged which is not observable. The primary owners (original owners) can take over other companie...

متن کامل

How barriers and motivators can affect Mashhad citizens' usage of bicycle sharing system: A qualitative approach

The purpose of the present study is to identify the motivators and the barriers of using Mashhad’s Bicycle Sharing System. Bicycle sharing systems (BSS) are carried out in different ways, so each system has specific features and conditions. The authors of this paper have used a qualitative approach with a thematic analysis method for an in-depth analysis of the motivators and barriers of Mashha...

متن کامل

Set-Sharing Is Not Always Redundant for Pair-Sharing

Sharing among program variables is vital information when analyzing logic programs. This information is often expressed either as sets or as pairs of program variables that (may) share. That is, either as set-sharing or as pair-sharing. It has been recently argued that (a) set-sharing is interesting not as an observable property in itself, but as an encoding for accurate pair-sharing, and that ...

متن کامل

Growth and Risk-Sharing with Private Information

We examine the impact of incomplete risk-sharing on growth and welfare. The source of market incompleteness in our economy is private information: a household’s idiosyncratic productivity shock is not observable by others. Risk-sharing between households occurs through long-term contracts with intermediaries. We ...nd that incomplete risk-sharing tends to reduce the rate of growth relative to t...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999